package com.example.dao;

import com.example.entity.ClassInfo;
import com.example.entity.XuankeInfo;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author 涛某
 * @version 1.0
 * @date 2024/3/28 9:47
 */
@Repository
public interface XuankeInfoDao extends Mapper<XuankeInfo> {
    @Select("select xuanke.*,teacher.name as teachername,zhuanye.name as zhuanyename from xuanke\n" +
            "LEFT JOIN teacher on xuanke.teacherid = teacher.id\n" +
            "LEFT JOIN zhuanye on xuanke.zhuanyeid = zhuanye.id")
    List<XuankeInfo> findAll();

}
